<template>
  <div class="goods" @click="goodsDetail">
    <div class="picture"><img v-lazy="{src:item.img640_url,loading:lazyPic}" alt=""></div>
    <div class="title">{{item.goods_name}}</div>
    <div class="price"><span class="curr"><i>￥</i><em>{{item.flash_price}}</em></span></div>
  </div>
  <!-- <div data-v-18e33bca data-v-204a54ba class="goods">
    <div data-v-18e33bca class="picture">
      <img
        data-v-18e33bca
        alt
        data-src="http://img.shandjj.com/fdc/20190529/img/46da08a82daf6160a3f75af8e3f2990b_640_640.jpg"
        src="http://img.shandjj.com/fdc/20190529/img/46da08a82daf6160a3f75af8e3f2990b_640_640.jpg"
        lazy="loaded"
      >
    </div>
    <div data-v-18e33bca class="title">耐克官网男鞋x sacai联名走秀款解构红蓝黄绿跑步女鞋AA3833-002</div>
    <div data-v-18e33bca class="price">
      <span data-v-18e33bca class="curr">
        <i data-v-18e33bca>￥</i><em data-v-18e33bca>899.00</em>&nbsp;&nbsp;&gt;
      </span>
    </div> -->
  </div>
</template>

<script>
export default {
  props: ["parentData"],
  data() {
    return {
      item: {},
      lazyPic: require("../../assets/img/publicImg/loading_default.png")
    };
  },
  created() {
    this.item = this.parentData;
  },
  methods: {
    goodsDetail() {
      this.$emit("childEvent", this.item.goods_id);
    }
  }
};
</script>

<style lang="less" scoped>
.goods-container {
  display: flex;
  flex-wrap: wrap;
  font-family: "微软雅黑";
  margin: 0 0.15rem;
  padding: 0.1rem 0.1rem 0rem;
  font-size: 0.3rem;
}
.goods {
  width: 2.18rem;
  padding: 0.1rem;
  margin-right: 0.1rem;
  margin-bottom: 0.12rem;
  background: #fff;
  font-size: 0.3rem;
  box-sizing: border-box;
  position: relative;
  border: 0.04rem solid #333;
  border-radius: 0.1rem;
  &:nth-child(3n) {
    margin-right: 0;
  }
  .picture {
    width: 100%;
    padding-top: 100%;
    position: relative;
    img {
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
    }
  }
  .title {
    height: 0.5rem;
    line-height: 0.26rem;
    font-size: 0.2rem;
    overflow: hidden;
  }
  .price {
    width: 1.45rem;
    margin: 0.06rem auto 0;
    line-height: 0.3rem;
    font-size: 0.26rem;
    text-align: center;
    border-radius: 0.3rem;
    color: #333;
    background: #FFBB04;
    i,
    em,
    del {
      font-style: normal;
    }
    .curr {
      font-weight: 700;
      i {
        font-size: 0.24rem;
      }
    }
  }
}
</style>